#!/usr/bin/env python
import pynchon
import numpy as np

# tests array printing
from pynchon.plot.shell import print_array, print_strings
# from imshow
def func3(x,y):
    return (1- x/2 + x**5 + y**3)*np.exp(-x**2-y**2)
dx, dy = .2, .2
x = np.arange(-3.0, 3.0, dx)
y = np.arange(-3.0, 3.0, dy)
X,Y = np.meshgrid(x, y)
Z = np.array (func3(X, Y))
print_array(Z)

# tests string printing
abcd = "ABCD"*60
hash = "####"*60
pref = (['a','b'],)
print_strings((hash, abcd), pref, width=160)

#
fh = open('data/PF01423_seed.txt', 'rb')
parser = pynchon.bio.io.fasta.fasta_parser(fh)
seq = parser.next()
header, seq, dummy = seq
print_strings((seq,),([header],))



